package com.wpp.service.impl;

import com.wpp.dao.EmployeeDao;
import com.wpp.pojo.Employee;
import com.wpp.service.EmployeeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class EmployeeServiceImpl implements EmployeeService {

    @Autowired
    private EmployeeDao employeeDao;

    @Override
    public List<Employee> GetFindAll() {
        List<Employee> employees = employeeDao.GetFindAll();
        return employees;
    }

    @Override
    public Employee GetFindById(Integer id) {
        Employee employees = employeeDao.GetFindById(id);
        return employees;
    }

    @Override
    public void UpdateById(Employee employee) {
        employeeDao.UpdateById(employee);
    }

    @Override
    public void InsertData(Employee employee) {
        employeeDao.InsertData(employee);
    }

    @Override
    public void DeleteById(Employee employee) {
        employeeDao.DeleteById(employee);
    }
}
